package com.ant.storage.common;


/**
 * @author hzd
 * @version 1.0
 * @date 2022/3/16 11:11
 */
//状态码 枚举
public enum ResultCode implements ResultInfoInterface {

    //#1000～1999 区间表示参数错误
    //#2000～2999 区间表示用户错误
    //#3000～3999 区间表示接口异常
    //#4000～4999 区间表示接口异常

    SUCCESS(200,"成功"),
    FAILURE (201,"失败"), //failure

    PARAM_IS_INVALID (1001,"参数无效"),
    PARAM_IS_BLANK (1002,"参数不能为空"),
    PARAM_TYPE_BIND_ERROR (1004,"参数类型错误"),
    PARAM_NOT_BLANK (1004,"缺少参数"),
    STAFF_PHONE_NULL(1005,"申请人电话不能为空"),
    APPROVER_PHONE_NULL(1006,"审批人电话不能为空"),
    CC_LIST_PHONE_NULL(1007,"抄送人电话不能为空"),
    ALLOCATION_OUT_NUMBER(1008,"出库数量应大于零并小于调拨数量"),
    WAREHOUSE_NULL(1009,"仓库为空"),
    DEPT_ERROR(1010,"部门错误"),
    GOOD_NUMBER_ERROR(1011,"商品数量错误"),
    GOOD_ID_ERROR(1012,"商品ID错误"),
    ALLOCATION_ID_ERROR(1013,"调拨申请单id错误"),
    INVENTORY_QUANTITY_ERROR(1014,"商品盘点数量应大于0"),
    INVENTORYCHECK_ID_ERROR(1015,"盘点库存id错误"),
    GOOD_NULL_ERROR(1016,"商品不能为空"),

    SQL_INSERT_ERR(3001,"数据库插入异常"),

    BODY_NOT_MATCH(400,"请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH(401,"请求的数字签名不匹配!"),
    NOT_FOUND(404, "未找到该资源!"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误!"),
    SERVER_BUSY(503,"服务器正忙，请稍后再试!"),
    REQUET_YPE_BIND_ERROR (4001,"缺少参数");

    public String getResultMsg;
    private  Integer code;
    private  String message;


    ResultCode(Integer code,String message){
        this.code=code;
        this.message=message;
    }


//    public  Integer get(){
//        return  this.code;
//    }
//    public  String getMessage(){
//        return  this.message;
//    }

    @Override
    public Integer getResultCode() {
        return code;
    }

    @Override
    public String getResultMsg() {
        return message;
    }
}
